<?php
namespace app\index\controller;
use think\Db;
use think\Session;
use app\index\model\User_model;

class User extends Common
{
    // 个人中心
    public function index()
    {
    	$rev = new User_model;
        $res = $rev->getindex();
       return view('index@User/index',[
        'node' => $res['list'],
        'user' => $res['user']
       ]);
    }

    // 修改资料
    public function edit()
    {
        $rev = new User_model;
        $res = $rev->editInfo();
        return $res;
    }

    public function nameEdit()
    {
        $rev = new User_model;
        $res = $rev->editName();
        return $res;
    }

    public function pwdEdit()
    {
        $rev = new User_model;
        $res = $rev->editPwd();
        return $res;
    }
    
}
